<template>
    <div>
        <Modal v-model="modalSs17012" :title=title width="1150" cancel-text="关闭" style="position:relative;"
               :mask-closable="false">
            <Spin v-if="Loading" size="large" fix></Spin>
            <Form ref="dataSs17012" :model="dataSs17012" :rules="ruleSs17012" inline :label-width="160"
                  :disabled=readonly>
                <table style="width:100%;">
                    <tr v-if="isSendedHd">
                        <td colspan="10">
                            <Alert type="error"><span style="color:#F00;">当前家庭已申请家庭经济状况核查，不允许编辑姓名、与申请人关系、证件号码、
                            户籍类别、与申请人关系、民族、婚姻状况、文化程度、健康状况、劳动能力丧失情况、身份证或户口簿等信息。</span></Alert>
                        </td>
                    </tr>
                    <tr>
                        <td style="width:33%;">
                            <FormItem label="姓名" prop="azcp0003">
                                <c-blank-input v-model="dataSs17012.azcp0003" placeholder="请输入姓名" :disabled="isSendedHd||$parent.familyInfo.townshipEdit"
                                               class="itemStyle"
                                               :maxlength="30"/>
                            </FormItem>
                        </td>
                        <td style="width:33%;">
                            <FormItem label="与申请人关系" prop="azcp0517">
                                <dictSelect :sel_val='dataSs17012.azcp0517' :disabled="isSendedHd"
                                            :bindData.sync="dataSs17012.azcp0517" dictCode="familyrelationship"
                                            hideKeys="01,10,20,30,40,50,60,70" class="itemStyle"/>
                            </FormItem>
                        </td>
                        <td rowspan="4" style="width:34%;">
                            <Upload action="" :accept="acceptImg"
                                    :before-upload="(file) => beforeUpload(file,'azcp0519')">
                                <img :src="dataSs17012.azcp0519" alt="..."
                                     style="height: 160px; width:120px;margin-left:100px;">
                            </Upload>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <FormItem label="证件类型" prop="azcp0002">
                                <dictSelect :sel_val='dataSs17012.azcp0002' :bindData.sync="dataSs17012.azcp0002"
                                            dictCode="certificatetype" showKeys="1" class="itemStyle"/>
                            </FormItem>
                        </td>
                        <td>
                            <FormItem label="证件号码" prop="azcp0001">
                                <Input v-model="dataSs17012.azcp0001" :disabled="isSendedHd||$parent.familyInfo.townshipEdit" placeholder=""
                                       class="itemStyle" @on-blur="checkIdcard()"/>
                            </FormItem>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <FormItem label="户籍类别" prop="azcp0013">
                                <dictSelect :sel_val='dataSs17012.azcp0013' :disabled="isSendedHd"
                                            :bindData.sync="dataSs17012.azcp0013" dictCode="registertype"
                                            class="itemStyle"/>
                            </FormItem>
                        </td>
                        <td>
                            <FormItem label="民族" prop="azcp0007">
                                <dictSelect :sel_val='dataSs17012.azcp0007' :disabled="isSendedHd"
                                            :bindData.sync="dataSs17012.azcp0007" dictCode="nation" class="itemStyle"/>
                            </FormItem>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <FormItem label="文化程度" prop="azcp0008">
                                <dictSelect :sel_val='dataSs17012.azcp0008' :disabled="isSendedHd"
                                            :bindData.sync="dataSs17012.azcp0008" dictCode="education"
                                            class="itemStyle"/>
                            </FormItem>
                        </td>
                        <td>
                            <FormItem label="婚姻状况" prop="azcp0010">
                                <dictSelect :sel_val='dataSs17012.azcp0010' :disabled="isSendedHd"
                                            :bindData.sync="dataSs17012.azcp0010" dictCode="maritalstatus"
                                            class="itemStyle"/>
                            </FormItem>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <FormItem label="政治面貌" prop="azcp0012">
                                <dictSelect :sel_val='dataSs17012.azcp0012' :bindData.sync="dataSs17012.azcp0012"
                                            dictCode="politicaloutlook" class="itemStyle"/>
                            </FormItem>
                        </td>
                        <td>
                            <FormItem label="劳动能力丧失情况" prop="azcp0502">
                                <dictSelect :sel_val='dataSs17012.azcp0502' :disabled="isSendedHd"
                                            :bindData.sync="dataSs17012.azcp0502" dictCode="workability"
                                            class="itemStyle"/>
                            </FormItem>
                        </td>
                        <td style="width:33%;">
                            <FormItem label="就业状况" prop="azcp0540">
                                <dictSelect :sel_val='dataSs17012.azcp0540' :bindData.sync="dataSs17012.azcp0540"
                                            dictCode="workstatus" class="itemStyle"/>
                            </FormItem>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <FormItem label="是否残疾" prop="azcp0503">
                                <dictSelect :sel_val='dataSs17012.azcp0503' :bindData.sync="dataSs17012.azcp0503"
                                            dictCode="yesorno" @changeState="setDisabilityState02" class="itemStyle"/>
                            </FormItem>
                        </td>
                        <td>
                            <FormItem label="残疾类别" prop="azcp0504" :rules="ruleAzcp0504">
                                <dictSelect :sel_val='dataSs17012.azcp0504' :bindData.sync="dataSs17012.azcp0504"
                                            dictCode="disabilitytype" :disabled="disabilityState02" class="itemStyle"/>
                            </FormItem>
                        </td>
                        <td>
                            <FormItem label="残疾等级" prop="azcp0505" :rules="ruleAzcp0505">
                                <dictSelect :sel_val='dataSs17012.azcp0505' :bindData.sync="dataSs17012.azcp0505"
                                            dictCode="disabilityclass" :disabled="disabilityState02" class="itemStyle"/>
                            </FormItem>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <FormItem label="健康状况" prop="azcp0009">
                                <dictSelect :sel_val='dataSs17012.azcp0009' :disabled="isSendedHd"
                                            :bindData.sync="dataSs17012.azcp0009" dictCode="health" class="itemStyle"
                                            @changeState="setHealthState02"/>
                            </FormItem>
                        </td>
                        <td>
                            <FormItem label="重病病种" prop="azcp0524" :rules="ruleAzcp0524">
                                <dictSelect :sel_val='dataSs17012.azcp0524' :bindData.sync="dataSs17012.azcp0524"
                                            dictCode="sicknesstype" :disabled="healthState02" class="itemStyle"/>
                            </FormItem>
                        </td>
                        <td>
                            <FormItem label="是否三无人员" prop="azcp0512">
                                <dictSelect :sel_val='dataSs17012.azcp0512' :bindData.sync="dataSs17012.azcp0512"
                                            dictCode="yesorno" class="itemStyle"/>
                            </FormItem>
                        </td>
                    </tr>
                    <!--                    户籍区划功能-->
                    <tr>
                        <td colspan="2">
                            <FormItem label="户籍地址" prop="azcp0596">
                                <Ss01003Tag :bindshengjiData.sync="dataSs17012.azcp0595"
                                            :bindshijiData.sync="dataSs17012.azcp0596"
                                            :shengji_value="dataSs17012.azcp0595"
                                            :shiji_value="dataSs17012.azcp0596"
                                            :shengji_disabled="hujiquhuaDisabled"
                                            :shiji_disabled="hujiquhuaDisabled">
                                </Ss01003Tag>
                            </FormItem>
                        </td>
                        <td>
                            <Button type="primary" @click="checkHuJi()" :loading="hujiLoading"
                                    style="margin-left:-100px" :disabled="isSendedHd">
                                <span v-if="!hujiLoading">户籍验证</span>
                                <span v-else>正在验证...</span>
                            </Button>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <FormItem label="证件上传类型">
                                <RadioGroup v-model="dataSs17012.azcp0593" type="button" @on-change="showUpload">
                                    <Radio label="0">身份证正反面照片上传</Radio>
                                    <Radio label="1" :disabled="householdRegisterState">户口簿个人页照片上传</Radio>
                                </RadioGroup>
                            </FormItem>
                        </td>
                        <td colspan="3" align="left">
                        </td>
                    </tr>
                </table>
                <Row class="" style="height:250px;line-height:150px;margin-top: 10px" >
                    <Col span="24" style="text-align: center" class="">
                        <Row v-if="identityCardVisible">
                            <Col span="12" class="">
                                <Upload action="" :accept="acceptImg" :disabled="isSendedHd"
                                        :before-upload="(file) => beforeUpload(file,'azcp0551')">
                                    <Row class="imgBackColor">
                                        <i-col span="20" class="idCard">
                                            <img :src="dataSs17012.azcp0551" class="head-img1">
                                        </i-col>
                                        <i-col span="4" class="positiveTDiv">正面上传</i-col>
                                    </Row>
                                </Upload>
                            </Col>
                            <Col span="12" style="text-align: center" class="">
                                <Upload action="" :accept="acceptImg" :disabled="isSendedHd"
                                        :before-upload="(file) => beforeUpload(file,'azcp0552')">
                                    <Row class="imgBackColor">
                                        <i-col span="20" class="idCard">
                                            <img :src="dataSs17012.azcp0552" class="head-img1">
                                        </i-col>
                                        <i-col span="4" class="positiveTDiv">反面上传</i-col>
                                    </Row>
                                </Upload>
                            </Col>
                        </Row>
                        <Row v-if="householdRegisterVisible">
                            <Col span="12" style="text-align: center" class="">
                                <Upload action="" :accept="acceptImg" :disabled="isSendedHd"
                                        :before-upload="(file) => beforeUpload(file,'azcp0594')">
                                    <Row class="imgBackColor">
                                        <i-col span="20" class="idCard">
                                            <img :src="dataSs17012.azcp0594" class="head-img1">
                                        </i-col>
                                        <i-col span="4" class="positiveTDiv">户口簿上传</i-col>
                                    </Row>
                                </Upload>
                            </Col>
                            <Col span="12" style="text-align: center" class="">
                            </Col>
                        </Row>
                    </Col>
                </Row>
            </Form>
            <div slot="footer">
                <Button type="text" size="large" @click="modalSs17012 = false">取消</Button>
                <Button type="primary" size="large" @click="handleSubmitSs17012('dataSs17012')" v-if=!readonly>确定
                </Button>
            </div>
        </Modal>
    </div>
</template>

<script>
  import dictSelect from '@/components/dictSelect/dictSelect.vue'
  import pic_hkb from '@/assets/images/hkb.jpg'
  import pic_sfz_z from '@/assets/images/sfz_z.jpg'
  import pic_sfz_f from '@/assets/images/sfz_f.jpg'
  import pic_header from '@/assets/images/header.jpeg'
  import { postAction } from '@/api/request'
  import { IdentityCodeValid, getAgeByIdcardByHD } from '@/plugins/idcardValid.js'
  import Ss01003Tag from '@/components/system/ss01003-select'// 户籍区划功能
  import { CommonMixin } from '@/views/common/js/CommonMixin'

  export default {
    mixins: [CommonMixin],
    components: {
      dictSelect,
      Ss01003Tag //户籍区划功能
    },
    data () {
      return {
        hujiLoading: false,
        hujiquhuaDisabled: false, //户籍区划功能
        isSendedHd: false,
        readonly: false,
        householdRegisterState: true, //户口簿是否可上传，默认false
        ss17001Id: '',
        url: {
          insertSs17012: '/api/ac/subsistence/ss17012Service/createData',
          updateSs17012: '/api/ac/subsistence/ss17012Service/updateData',
        },
        title: '',
        dataSs17012: {
          type: '0', // 非保障
          id: '',
          azcp0001: '',
          azcp0002: '',
          azcp0003: '',
          azcp0517: '',
          azcp0519: '',
          azcp0013: '',
          azcp0007: '',
          azcp0008: '',
          azcp0009: '',
          azcp0010: '',
          azcp0012: '',
          azcp0502: '',
          azcp0503: '',
          azcp0504: '',
          azcp0505: '',
          azcp0524: '',
          azcp0543: '',
          azcp0551: '',
          azcp0552: '',
          azcp0512: '',
          azcp0593: '',
          azcp0594: '',
          azcp0500: '',
          azcp0595: '',
          azcp0596: ''
        },
        modalSs17012: false, //非保障人员model显隐
        healthState02: false,  //保障人员健康状况联动状态
        disabilityState02: false, //非保障人员残疾联动状态
        fieldsToValidate02: ['azcp0003', 'azcp0517', 'azcp0002', 'azcp0001', 'azcp0013', 'azcp0007', 'azcp0008', 'azcp0012', 'azcp0010',
          'azcp0540', 'azcp0502', 'azcp0503', 'azcp0504', 'azcp0505', 'azcp0009', 'azcp0524', 'azcp0512','azcp0596'],
        ruleSs17012: {
          azcp0003: [
            { required: true, message: '请输入姓名', trigger: 'blur' }
          ],
          azcp0517: [
            { required: true, message: '请选择与申请人关系', trigger: 'blur' }
          ],
          azcp0002: [
            { required: true, message: '请选择证件类型', trigger: 'blur' }
          ],
          azcp0001: [
            { required: true, message: '请填写证件号码', trigger: 'blur' }
          ],
          azcp0013: [
            { required: true, message: '请选择户籍类别', trigger: 'blur' }
          ],
          azcp0007: [
            { required: true, message: '请选择民族', trigger: 'blur' }
          ],
          azcp0008: [
            { required: true, message: '请选择文化程度', trigger: 'blur' }
          ],
          azcp0012: [
            { required: true, message: '请选择政治面貌', trigger: 'blur' }
          ],
          azcp0010: [
            { required: true, message: '请选择婚姻状况', trigger: 'blur' }
          ],
          azcp0540: [
            { required: true, message: '请选择就业状况', trigger: 'blur' }
          ],
          azcp0009: [
            { required: true, message: '请选择健康状况', trigger: 'blur' }
          ],
          azcp0502: [
            { required: true, message: '请选择劳动能力丧失情况', trigger: 'blur' }
          ],
          azcp0503: [
            { required: true, message: '请选择是否残疾', trigger: 'blur' }
          ],
          azcp0512: [
            { required: true, message: '请选择是否三无人员', trigger: 'blur' }
          ],
          azcp0596: [
            { required: true, message: '请选择户籍地址', trigger: 'blur' }
          ]
        },
        ruleAzcp0504: { message: '请选择残疾类别', trigger: 'blur' },
        ruleAzcp0505: { message: '请选择残疾等级', trigger: 'blur' },
        ruleAzcp0524: { message: '请选择重病病种', trigger: 'blur' },
        identityCardVisible: true,
        householdRegisterVisible: false,
        Loading: false
      }
    },
    methods: {
      loadImg (response, file, name, id) {
        if (response.errcode == 0) {
          this.$set(this.dataSs17012, name, response.data)
        } else {
          this.$Message.error('上传失败！')
        }
        this.Loading = false
      },
      showUpload (type) {
        //已发送核对或详情状态不触发事件
        if (this.isSendedHd || this.readonly) {
          return
        }
        let that = this
        if (type == '0') {
          that.identityCardVisible = true
          that.householdRegisterVisible = false
          that.dataSs17012.azcp0593 = '0'
          let azcp0551 = that.dataSs17012.azcp0551
          if (this.isEmpty(azcp0551)) {
            that.dataSs17012.azcp0551 = pic_sfz_z
          }
          let azcp0552 = that.dataSs17012.azcp0552
          if (this.isEmpty(azcp0552)) {
            that.dataSs17012.azcp0552 = pic_sfz_f
          }
        } else {
          that.identityCardVisible = false
          that.householdRegisterVisible = true
          that.dataSs17012.azcp0593 = '1'

          let azcp0594 = that.dataSs17012.azcp0594
          if (this.isEmpty(azcp0594)) {
            that.dataSs17012.azcp0594 = pic_hkb
          }
        }
      },
      create () {
        let that = this
        that.readonly = false
        that.clearPropertyValue(that.dataSs17012);
        that.title = '非保障家庭成员录入'
        that.modalSs17012 = true
        that.initRelation02()
        that.dataSs17012.azcp0500 = that.ss17001Id
        that.householdRegisterState = true
        that.shengShiQuHua(undefined) //户籍区划功能
        that.dataSs17012.azcp0519 = pic_header
        that.dataSs17012.azcp0551 = pic_sfz_z
        that.dataSs17012.azcp0552 = pic_sfz_f
        that.dataSs17012.azcp0594 = pic_hkb
      },

      load (url, dataParam) {
        this.Loading = true
        this.readonly = false
        this.title = '非保障家庭成员编辑'
        this.modalSs17012 = true
        var that = this
        postAction(url, dataParam).then((res) => {
          if (res.data.data.code == 1) {
            if (this.isEmpty(res.data.data.data.azcp0591)) {//加载信息时若未进行户籍验证, 则户籍地址不可选, 强制用户进行户籍验证
              that.hujiquhuaDisabled = true
              res.data.data.data.azcp0595 = ''
              res.data.data.data.azcp0596 = ''
            }
            that.edit(res.data.data.data)
            that.hujiquhuaDisabled = that.isSendedHd ? true : false
          } else {
            that.$Message.error(res.data.data.msg)
          }
        }).finally(() => {
          this.Loading = false
        })
      },
      edit (record) {
        let that = this
        that.dataSs17012 = Object.assign({}, record)
        that.initRelation02()
        if (that.dataSs17012.azcp0593 == '1') {
          let azcp0594 = that.dataSs17012.azcp0594
          if (this.isEmpty(azcp0594)) {
            that.dataSs17012.azcp0594 = pic_hkb
          }
        } else {
          let azcp0551 = that.dataSs17012.azcp0551
          if (this.isEmpty(azcp0551)) {
            that.dataSs17012.azcp0551 = pic_sfz_z
          }
          let azcp0552 = that.dataSs17012.azcp0552
          if (this.isEmpty(azcp0552)) {
            that.dataSs17012.azcp0552 = pic_sfz_f
          }
        }
        let azcp0519 = that.dataSs17012.azcp0519
        if (this.isEmpty(azcp0519)) {
          that.dataSs17012.azcp0519 = pic_header
        }
        that.showUpload(that.dataSs17012.azcp0593)
        that.checkIdcard()
        //已申请家庭经济状况核查
        that.isSendedHd = that.$parent.familyInfo.isSendedHd
        that.shengShiQuHua(that.dataSs17012.azcp0591) //户籍区划功能
      },
      view (record) {
        let that = this
        that.readonly = true
        that.title = '非保障家庭成员详情'
        that.modalSs17012 = true
        that.edit(record)
      },
      handleSubmitSs17012 (name) { // 非保障人员信息提交
        let that = this
        let validate = true
        let err_msg = []
        for (let item of that.fieldsToValidate02) {
          that.$refs[name].validateField(item, (error) => {
            if (error) {
              validate = false
              err_msg.push(that.ruleSs17012[item][0].message)
            }
          })
        }
        console.log('ss17012model',that.dataSs17012);
        if (validate) {
          let dataParam = {}
          dataParam = Object.assign({}, that.dataSs17012)
          let url = null
          if (that.isEmpty(dataParam.id)) {
            url = that.url.insertSs17012
          } else {
            url = that.url.updateSs17012
          }
          if (dataParam.azcp0593 == '1') {
            let azcp0594 = dataParam.azcp0594
            if (that.isEmpty(azcp0594) || azcp0594 == pic_hkb) {
              that.$Message.error('请上传个人户口簿页面照片')
              return
            }
            dataParam.azcp0551 = ''
            dataParam.azcp0552 = ''
          } else {
            let azcp0551 = dataParam.azcp0551
            if (that.isEmpty(azcp0551) || azcp0551 == pic_sfz_z) {
              that.$Message.error('请上传居民身份证正面照片')
              return
            }

            let azcp0552 = dataParam.azcp0552
            if (that.isEmpty(azcp0552) || azcp0552 == pic_sfz_f) {
              that.$Message.error('请上传居民身份证背面照片')
              return
            }
            dataParam.azcp0594 = ''
          }
          if(dataParam.azcp0519==pic_header){
            dataParam.azcp0519=null;
          }
          that.Loading = true
          postAction(url, dataParam).then((res) => {
            if (res.data.data.code == 1) {
              that.modalSs17012 = false
              that.$Message.success(res.data.data.msg)
              that.$emit('ok')
            } else {
              that.$Message.error(res.data.data.msg)
            }
          }).finally(() => {
            that.Loading = false
          })
        } else {
          that.$Message.error(err_msg[0])
          return
        }
      },
      initRelation02 () { //初始化保障人员页面选择联动
        let that = this
        that.setDisabilityState02()
        that.setHealthState02()
      },
      setDisabilityState02 () { //非保障残疾联动
        let that = this
        let value = that.dataSs17012.azcp0503
        if (value == '1') {
          that.disabilityState02 = false
          that.ruleAzcp0504 = [{ required: true, message: '请选择残疾类别', trigger: 'blur' }]
          that.ruleAzcp0505 = [{ required: true, message: '请选择残疾等级', trigger: 'blur' }]
          that.ruleSs17012.azcp0504 = that.ruleAzcp0504
          that.ruleSs17012.azcp0505 = that.ruleAzcp0505
        } else {
          that.ruleAzcp0504 = [{ required: false }]
          that.ruleAzcp0505 = [{ required: false }]
          this.$set(this.dataSs17012, 'azcp0504', '')
          this.$set(this.dataSs17012, 'azcp0505', '')
          that.disabilityState02 = true
          delete that.ruleSs17012.azcp0504
          delete that.ruleSs17012.azcp0505
        }
      },
      setHealthState02 () {  //非保障健康联动
        let that = this
        let value = that.dataSs17012.azcp0009
        if (value == '40') {  //重病
          that.healthState02 = false
          that.ruleAzcp0524 = [{ required: true, message: '请选择重病病种', trigger: 'blur' }]
          that.ruleSs17012.azcp0524 = that.ruleAzcp0524
        } else { //健康、一般、慢性病
          that.ruleAzcp0524 = [{ required: false }]
          this.$set(this.dataSs17012, 'azcp0524', '')
          that.healthState02 = true
          delete that.ruleSs17012.azcp0524
        }
      },
      checkIdcard () {
        let that = this
        let azcp0001 = that.dataSs17012.azcp0001
        if (that.isEmpty(azcp0001)) { //以防页面报错
          return
        }
        azcp0001 = azcp0001.toUpperCase()
        that.dataSs17012.azcp0001 = azcp0001

        if (!IdentityCodeValid(azcp0001)) {
          that.$Message.error('申请人身份证号码格式不合法')
          that.dataSs17012.azcp0001 = null
        } else {
          let age = getAgeByIdcardByHD(azcp0001, new Date())
          if (age > 18) {
            that.householdRegisterState = true
            that.householdRegisterVisible = false
            that.identityCardVisible = true
          } else {
            that.householdRegisterState = false
          }
        }
      },
      // 户籍区划功能,
      shengShiQuHua (localOrNot) {
        if (this.isEmpty(localOrNot)) {
          this.hujiquhuaDisabled = true
          this.dataSs17012.azcp0595 = null
          this.dataSs17012.azcp0596 = null
        } else if (localOrNot == '1') { //本地户籍的, 区划 not editable
          this.hujiquhuaDisabled = true
          this.dataSs17012.azcp0595 = '210000000000'
          this.dataSs17012.azcp0596 = '210100000000'
        } else if (localOrNot == '0') { //外地户籍的, 区划 editable
          this.hujiquhuaDisabled = false
        }
      },
      checkHuJi () {
        let that = this
        if (that.isEmpty(that.dataSs17012.azcp0003)) {
          that.$Message.error('请输入姓名')
          return
        }
        if (that.isEmpty(that.dataSs17012.azcp0001)) {
          that.$Message.error('请输入身份证号')
          return
        }
        //请求参数
        var dataParam = {
          azcp0001: that.dataSs17012.azcp0001,
          azcp0003: that.dataSs17012.azcp0003,
        }

        that.hujiLoading = true
        postAction('/api/ac/subsistence/ss00011Service/checkHuJi', dataParam).then((res) => {
          if (res.data.data.msg == 'success') {
            if (res.data.data.local == 'true') {
              that.dataSs17012.azcp0591 = '1'
              that.shengShiQuHua('1')
              that.$Message.success('户籍验证成功')
            } else {
              that.dataSs17012.azcp0591 = '0'
              that.shengShiQuHua('0')
              that.$Message.success('户籍验证成功, 此人为非本市户籍, 请选择户籍地址')
            }
            that.hujiLoading = false
          } else {
            that.$Message.error('户籍验证失败')
            that.hujiLoading = false
          }
        }).finally(() => {
        })

      }
    }
  }
</script>

<style scoped>
    /deep/ .ivu-form-item-error-tip {
        display: none;
    }

    .ivu-form-item {
        margin-bottom: 0px;
    }

    .itemStyle {
        width: 180px
    }

    .head-img1 {
        height: 200px;
        width: 343px;
        margin-top: 15px;
    }

    .imgBackColor {
        height: 250px;
    }

    .positiveTDiv {
        height: 250px;
        background-color: #7CCD7C;
        color: white;
        font-size: 17px;
        font-weight: 700;
        word-wrap: break-word; /*英文的时候需要加上这句，自动换行*/
        writing-mode: vertical-rl; /*从左向右 从右向左是 writing-mode: vertical-rl;*/
        writing-mode: tb-rl; /*IE浏览器的从左向右 从右向左是 writing-mode: tb-rl；*/
        text-align: center;
        padding: 0px;
        display: flex;
        -webkit-display: flex;
        flex-direction: column;
        justify-content: center;
        letter-spacing: 20px;
        border-radius: 3px;
    }

    .idCard {
        height: 100%;
        padding: 20px;
        background-color: WhiteSmoke;
    }
</style>
